<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*块级元素特点：独占一行可以修改宽高*/
        div{
            width: 100px;
            height:100px;
            border: 1px solid red;
        }
        /*行内元素特点：共占一行，不能修改宽高*/
        span{
            border: 1px solid blue;
            width: 100px;
            height:100px;
        }
        /*行内块特点：共占一行，可以修改宽高*/
        img{
            width: 100px;
            height: 100px;
        }

        a{
            background: green;
            /*行内元素默认是不能修改宽高的，如果必须改则需要先将行内元素改成块级或行内块元素*/
            display:block;

            width: 100px;
            height:50px;
        }

    </style>
</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>

<span>span1</span>
<span>span2</span>
<span>span3</span>

<img src="../gxs.jpg" alt="">
<img src="../gxs.jpg" alt="">
<img src="../gxs.jpg" alt="">

<a href="http://www.baidu.com">百度</a>
</body>
</html>